import java.util.*;

public class Main {
    public static int index = 0;
    public static String solve(String s, int idx, int len) {
        if (idx > len) return null;
        int i = idx;
        for (; i < len; i++) {
            char ch = s.charAt(i);
            if (ch == ' ') break;
        }
        index = i + 1;
        return s.substring(idx,i);
    }

    public static void main(String[] args) {
        List<Integer> list = new ArrayList<>(20);
        list.add(1);
    }
    public static void main1(String[] args) {
        Scanner sc = new Scanner(System.in);
        List<String> list = new ArrayList<>();
        Set<String> set = new HashSet<>();
        while (sc.hasNextLine()) {
            String s = sc.nextLine();
            int len = s.length();
            index = 0;
            while (index < len) {
                String t = solve(s,index,len);
                if (t != null) {
                    set.add(t);
                }
            }
        }
        System.out.println(set.size());
    }
}

//public class Main {
//    public static void main(String[] args) {
//        Scanner sc = new Scanner(System.in);
////        int n = sc.nextInt();
////
////        int[] fib = new int[1000];
////        fib[0] = 0;
////        fib[1] = 1;
////        fib[2] = 1;
////        int i = 3;
////        for (; fib[i - 1] <= n; i++) {
////            fib[i] = fib[i - 1] + fib[i - 2];
////        }
//        String s = "eo ";
//        String t = "hello world";
//        System.out.println(t.substring(0,2));
//        //int res = Math.min(fib[i - 1] - n, n - fib[i - 2]);
//        //System.out.println(res);
//    }
//}